// @ts-ignore
import React from 'react';
import { createRoot } from 'react-dom/client';
import App from './App';
import { BrowserRouter } from 'react-router-dom';
import './index.css';

// 初始化环境，确保使用正确的环境
const savedEnv = localStorage.getItem('env');
if (!savedEnv) {
    localStorage.setItem('env', 'prd');  // 默认设置为生产环境
}

const root = createRoot(document.getElementById('root')!);  // 获取 root DOM 元素

// 渲染应用
root.render(
    <BrowserRouter>
        <App />
    </BrowserRouter>
);
